package start.spring.basic.job.controller.jobmonitor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.security.annotation.RequiresPermissions;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import start.spring.basic.job.common.SysConstant;
import start.spring.basic.job.controller.BaseController;
import start.spring.basic.job.entity.GgJobLog;
import start.spring.basic.job.service.jobmonitor.IGgJobLogService;
import start.spring.basic.log.ServiceLog;
import start.spring.basic.page.PageQuery;
import start.spring.basic.response.ResponsePage;

/**
 * 
 * @author xyy
 * @date 2023-06-27
 *
 */
@RestController
@RequestMapping("/joblog")
@Api(tags = "JOB历史执行日志相关接口")
public class GgJobLogController extends BaseController {
	
    @Autowired
    private IGgJobLogService ggJobLogService;
	
    @ServiceLog(businessType = "查询JOB历史执行日志列表", systemType = SysConstant.SYSTEM_TYPE, recordResult = false, userId = "")
    @RequiresPermissions("job:jobmonitor:list")
    @PostMapping("/list")
    @ApiOperation(value = "查询JOB历史执行日志列表", notes = "分页查询")
    public ResponsePage<GgJobLog> list(PageQuery pageQuery, @RequestBody GgJobLog ggJobLog) {
    	return super.returnResponse(this.ggJobLogService.selectGgJobLogPageList(pageQuery, ggJobLog));
    }
}
